perm filename POX.REM[UP,DOC]1 blob sn#040057 filedate 1973-05-04 generic text, type T, neo UTF8
XGP -- MRPP3
This writeup is MRPP3.WRU[XGP,REM]  1973 APR 25  p.1

Maas Research Paper Plotter program, version 3 (earlier versions in 1969 used Calcomp 565)
Program to switch fonts and justify text, by Robert Elton Maas, 1973 March
The system command to run this program is RU MRPP3[XGP,REM]

	The program asks for a command string  of  the  form  <OUTPUT
FILE>←<INPUT  FILE>  with perhaps switches after the input file name.
The input file may contain line numbers or a TV-EDIT directory  which
will  be  ignored.  It may also contain XGP escape characters (RUBOUT
followed by ↓ or α) at most places in the file. The output file  will
be  in  a  form  that  can be copied directly to the XGP in mode 0 by
means of the "XG" command, and in  addition  there  will  be  a  file
QQXGP.RPG  written,  which  contains  the  font  switches  needed for
listing the file on the XGP.  Upon exit, it will  put  XG  @QQXGP.RPG
into  your  TTY  buffer  so  that  all you have to do is hit carriage
return to gronk the XGP.
	The  first character of the input file will be interpreted as
the escape character you wish to use initially. (In the remainder  of
this  writeup,  the  character \ represents whatever Escape Character
you have in effect at the moment.)  Subsequent  occurrances  of  this
character  will  escape  to  command mode and cause special things to
happen depending on the next character (see below). If, however,  the
second character of your file is | or . then this program will assume
you left out the initial definition of the break character, and  will
retroactively  escape  on  the  first  character.  Using this feature
allows  you  to  create  files  that  may  be  concatinated   without
re-editing  anything. Simply begin each file with \|\ or \.<crlf> and
delete directory pages whenever concatinating. (The above  paragraph,
and  all  information  about  \-commands from here to the end of this
writeup, do not apply at all if the /XAPJUS switch has been used,  in
which  case your source file should NOT contain any escape characters
whatsoever.)
	Below is a list of commands, where <N> represents a character
in the range of 0,1,2,...,9,A,B,...,F  that  specifies  the  font  ID
number,  <KH>  represents any character, and <FONT> represents a font
filename (defaults are .FNT[XGP,SYS])

\|<KH>		(changes the escape character to <KH>)<foo>
\M<N><FONT>;	(causes the font to be compiled, and selects it now)
\F<N>		(selects a font which has already been compiled)
\f<N>		(selects a font for just one character,
  then back to old font)
\S		(generates a sample of the currently-selected font,
  see bulletin board)
\;		(everything until next crlf is a comment,
  typed on tty
  but not included in output file, the crlf is flushed totally
  -- actually, the most frequent usage of this command is to break up a very-long
  input line without causing <crlf> to appear in the middle of the output)
\,		(same as \; except it flushes through next
  page mark or form-feed -- not valid in paragraph mode etc.)
\\			(quotes the escape character)
\J		(begins full-justify submode, use \. to exit
this mode, append <crlf>, and flush input data through next <crlf> --
  while in this mode, the only system rubout-style escape command
  that is legal is "change font" -- the following \-style
  commands are presently available:  \\ \F<N> --
  soon we will also have:  \↑Q \↓Q \∩ \∪
\⊗)
\R		(begins align-text-against-right-margin-mode,
  until the next
  <crlf> (output <crlf> and go to next line)
\; (no  <crlf>, flush input through next <crlf>)
 or \. (no <crlf>, resume input parsing immediately) occurs --
 the latter two will allow overprinting
  -- almost the same command restrictions as \J mode)
\C		(begins center-the-line mode, similar to \R)

This writeup is MRPP3.WRU[XGP,REM]  p.2

Q-REGISTERS
	There  are  128  registers which can hold any 36-bit integer,
usually the horizonal coordinate of some column on the page. The idea
is    to    allow    specification   of   multi-column   tables   and
superscripts-above-subscripts in an easy and flexable way,  including
automatic  allocation  of  such  things  as "1/5 of a page" by simple
division.  Each register is specified by an  ASCII  character,  hence
some  registers are actually inaccessible, but who cares?  Register 0
(null character, inaccessible usually) is  called  the  "accumulator"
and  is  the  intermediate  storage  for  all sequences of arithmetic
calculation.  Register '56 (the period character)  always  represents
the  current column location. Every time a character is written, this
q-register is updated to  account  for  the  space  used  up  by  the
character,  and  if  you  try  to  write in this q-register, a column
select will be generated in your output file as well as updating  the
q-register  to  reflect  the  column  select. Q-reg's L and R are the
LEFT-MARGIN and the RIGHT-MARGIN. The commands are shown below, where
the  letter  Q  represents  any  character,  and  is used to select a
q-register -- however, if Q is the right-apostrophe "'", then instead
of  reading from a q-register, the octal digits from here to the next
semicolon are assembled into an unsigned constant and  that  constant
acts  as  an immediate operand.  Also, an equal-sign causes a decimal
argument to be scanned up to the next semicolon. Also,  lower-case  w
followed by character gives the width of that character:

\←Q	(Load ac from q-reg)
\+Q	(ac plus q-reg, result in ac)
\-Q	(ac minus q-reg, result in ac)
\¬Q	(q-reg minus ac, result in ac)
\*Q	(ac times q-reg, result in ac)
\/Q	(ac divided by q-reg, result (quotient) in ac)
\\Q	(q-reg divided by ac, result (quotient) in ac)
\~Q	(maximum of ac and q-reg, result in ac)
\_Q	(minimum of ac and q-reg, result in ac)
\→Q	(store contents of ac into q-reg, immediate operand not allowed)
\↑Q	(move text up q/200 inch)
\↓Q	(move text down q/200 inch)
\∩	(up to default superscript location)
\∪	(down to default subscript location)
\⊗	(back to normal baseline, don't forget this!)
\ULABR	(underline from location L to location R,
on scan line A, with line thickness B -- each of L,A,B,R may be a q-reg
or an immediate operand)
\j \r or \c
(same as \J \R or \C except they set up temporary margins
  from q-registers l and r) 
	[What you see above is an abridged version of MRPP3.WRU which
can  be  viewed  on  your  teletype.  Type the command HELP MRPP3 for
instructions  on  how  to  produce  a  hardcopy   of   the   complete
documentation in nice format.]